package ynu.edu.dao;

import org.aspectj.weaver.ast.Or;
import org.springframework.data.jpa.repository.Query;
import ynu.edu.common.dao.LogicDAO;
import ynu.edu.entity.Customer;
import ynu.edu.entity.Item;
import ynu.edu.entity.Order;

import java.util.List;

public interface IOrderDao extends LogicDAO<Order,Long> {
    //获取最新订单
    public Order findFirstByCustomerOrderByIdDesc(Customer customer);
    //查询用户订单
    @Query("select o from Order o where o.customer = ?1 and o.isDeleted = 0")
    public List<Order> findByCustomer(Customer customer);
}
